Automated cost calculation for virtualized infrastructure

ABSTRACT

In one embodiment, a method includes storing a cost assigned to a physical computing device in a storage device. The physical computing device is found in a physical infrastructure of a data center. The method determines an instantiation of a virtual machine in a virtual infrastructure. Information for a provisioning of the virtual machine with the physical computing device in the physical infrastructure of the data center is then received. The cost assigned to the physical computing device from the storage device is determined where the cost is used to determine a charge for the virtual machine based on usage of the physical computing device.

BACKGROUND

A chargeback application may be used to account for the operationalcosts involved in providing and maintaining an information technology(IT) infrastructure, including the costs for IT services andapplications. Measuring resource utilization and calculating thecorresponding IT operational cost enable a data center to account forthe IT resources utilized and bill for the services provided.

A customer of the data center may be an entity, such as a business, thatmay be organized in various departments or business units. Eachdepartment may use different computing resources of the data center. Thedata center then may charge the entity by department. For example, abill may be generated detailing charges per department.

In a non-virtualized environment, a physical server and the associatedresources like the applications running on the server can be easilymapped to a department using them, making the billing for such resourceutilizations relatively easy. Also, costs incurred due to maintenanceand licensing can be directly associated to a department, therebyenabling the data center to calculate the complete IT operational costs.

In a virtualized environment, however, the task of calculating the IToperational cost for each department becomes more difficult. Multiplevirtual machines run on a physical server, which might be shared acrossdifferent departments in the entity. As a result, resource utilizationfor this server and, therefore, the cost incurred cannot be directlyassociated to any single department. The difficulty in accounting forthe data center gets further compounded when applications and servicesget shifted over time to different servers, based on the load andavailable infrastructure resources.

In using the virtualized environment, the customer of the data centermay instantiate a number of virtual machines (VMs) in a virtualinfrastructure. The virtual infrastructure may be a listing ofdepartments and which virtual machines have been instantiated by eachdepartment. A configuration may be used to specify computing resourcesthat are desired. For example, the configuration may include types ofcomputing resources (e.g., a host with a certain processing speed) orfixed levels of service that can be provided.

A data center administrator is a user who configures costs for usingresources of the data center. The data center administrator may assign acost to a virtual machine based on the desired configuration. Forexample, based on the type of computing resources requested, the datacenter administrator assigns a cost to the virtual machine. In thiscase, the cost may be input using the chargeback application andassociated with the virtual machine in the virtual infrastructure.

Other methods for assigning the cost to a virtual machine includedefining fixed levels of access. For example, the fixed levels maydetermine certain types of resources that can be used by a virtualmachine. In one example, a small level may include a certain amount ofCPU speed and storage, such as a CPU speed of 1 GHz and storage of 1 GB.The small level may be a fixed cost of $0.05 per hour. A medium levelmay include a higher level of computing resources and rates. Forexample, computing resources for the medium level may include a CPUspeed of 1.5 GHz and 2 GB of storage for the cost of $0.10 per hour. Acustomer may select which level to apply to a virtual machine. The ratefor the level is then assigned to the virtual machine.

Once the virtual machine is instantiated, the virtual machine may beprovisioned with computing devices in the data center. The provisioningmay be performed before or after assignment of the cost to the virtualmachine. However, the data center administrator assigning the cost maynot be aware of which computing devices are provisioned with the virtualmachine. Rather, the configuration requested is used to determine thecost. The usage of the provisioned computing resources is thenmonitored. Using the cost assigned to the virtual machine, a charge forthe usage may be determined for the customer.

If the data center administrator is not aware of which computing devicesare provisioned with the virtual machine, the costs assigned may not bereflective of the service being provided. For example, a virtual machinemay be assigned to a computing device that is considered a moreexpensive computing device in the data center. The cost assigned to thevirtual machine may not be reflective of the higher level of servicethat this computing device is providing.

The use of virtual machines may change frequently for a customer. Forexample, different divisions of the customer may instantiate or removevirtual machines from the virtual infrastructure. When a new virtualmachine is instantiated, the data center administrator has to analyzethe requested computing resources for the virtual machine and input acost for that virtual machine. This may be a time-consuming processbecause of the frequency in which virtual machines are added andremoved.

SUMMARY

In one embodiment, a method includes storing a cost assigned to aphysical computing device in a storage device. The physical computingdevice is found in a physical infrastructure of a data center. Themethod determines an instantiation of a virtual machine in a virtualinfrastructure. Information is received for provisioning of the virtualmachine with the physical computing device in the physicalinfrastructure of the data center. The cost assigned to the physicalcomputing device from the storage device is determined where the cost isused to determine a charge for the virtual machine based on usage of thephysical computing device.

In one embodiment, the cost is assigned to a computing resource of thephysical computing device and the usage of the computing resource isused to determine the charge.

In one embodiment, the method receives a selection of one or moreattributes for a computing resource of the physical computing device anda selection of an operation. An expression is generated from theselection of the one or more attributes and the operation where theexpression used to determine the charge when the computing resource isused by the virtual machine.

In one embodiment, the method includes determining a plurality of tiersfor a computing resource of the physical computing device; assigning acost to each tier; determining the virtual machine is associated withthe computing resource included in a tier in the plurality of tiers; andusing the cost of the tier to determine the charge for the virtualmachine.

In another embodiment, a non-transitory computer-readable storage mediumcontaining instructions for controlling a computer system is provided.The computer system is operable to: store a cost assigned to a physicalcomputing device in a storage device, the physical computing devicebeing found in a physical infrastructure of a data center; determine aninstantiation of a virtual machine in a virtual infrastructure; receiveinformation for a provisioning of the virtual machine with the physicalcomputing device in the physical infrastructure of the data center; andretrieve the cost assigned to the physical computing device from thestorage device, wherein the cost is used to determine a charge for thevirtual machine based on usage of the physical computing device.

In another embodiment, a method includes storing a plurality of costs toa plurality of computing resources in a data storage device. Theplurality of computing resources are found in a physical infrastructure.The usage of a computing resource by a virtual machine is measured in avirtual infrastructure. A physical computing device in the physicalinfrastructure is determined that is associated with the computingresource. A cost assigned to the computing resource is retrieved fromthe data storage device based on the determined physical computingdevice. A charge is determined for the virtual machine based on themeasured usage of the computing resource and the determined costassigned the computing resource.

The following detailed description and accompanying drawings provide amore detailed understanding of the nature and advantages of the presentinvention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts an example of a system for calculating costs for avirtual infrastructure according to one embodiment.

FIG. 2a depicts an example of a hierarchy for a physical infrastructureand a virtual infrastructure according to one embodiment.

FIG. 2b shows an example of configured costs for computing resourcesaccording to one embodiment.

FIG. 3 illustrates a simplified example of a physical infrastructure ofa data center according to one embodiment.

FIG. 4 depicts a simplified flowchart of a method for calculating a costfor a virtual machine according to one embodiment.

FIG. 5 depicts a simplified flowchart of a method for determining a VMbilling policy according to one embodiment.

FIG. 6 depicts a more detailed example of a chargeback manager accordingto one embodiment.

DETAILED DESCRIPTION

In the following description, for purposes of explanation, numerousexamples and specific details are set forth in order to provide athorough understanding of embodiments of the present invention.Particular embodiments as defined by the claims may include some or allof the features in these examples alone or in combination with otherfeatures described below, and may further include modifications andequivalents of the features and concepts described herein.

FIG. 1 depicts an example of a system 100 for calculating costs for avirtual infrastructure according to one embodiment. System 100 includesa chargeback server 102, a client 110, and a database 112.

Client 110 may be a computing device used to configure an applicationfor charging an entity for use of a data center. The entity may be acompany that is a customer of the data center. The data center may beleasing access of computing resources to the customer.

Chargeback server 102 uses a chargeback manager 104 to determine a costthat is used to calculate a charge for use of computing resources forthe entity. For example, chargeback manager 104 may be an applicationthat determines charges for the use of virtual machines in the datacenter.

Particular embodiments assign costs to a physical infrastructure of thedata center. For example, the physical infrastructure of the data centermay include physical computing devices, such as hosts (or clusters ofhosts), datastores, and networks. The computing devices includecomputing resources. Computing resources may be a physical or virtualcomponent of a computing device. For example, computing resources for ahost may be defined as memory, CPU, disk read and write, disk read, diskwrite, network received and transmitted, network received, networktransmitted, and virtual CPU (vCPU). Computing resources for datastores304 may be an amount of storage. The amount of storage for datastoresmay be different from disk storage of a host, which is internal memoryfor the host. Also, computing resources for networks may be differentnetworks with different quality of service guarantees. Computingresources for datastores may be an amount of storage provided to thevirtual machine, the speed of access of data in the storage, or otherstorage features (e.g., mirroring). Costs may be configured for thecomputing devices in the physical infrastructure. For example, costs areconfigured for computing resources of the computing devices in thephysical infrastructure.

A virtual machine may be instantiated in a virtual infrastructure forthe entity. The instantiation may include a configuration of the virtualmachine. Different examples of the configuration may be received. Forexample, the configuration may include information for a host, adatastore, a network. The configuration may be specified as a type ofcomputing resource (e.g., a computer processing unit (CPU) of a certainspeed), a specific physical computing entity (e.g., host H1), a level ofservice (e.g., a gold level), or in other ways that allow provisioningof a computing device.

A virtual machine is provisioned on a computing device, such as aphysical host. Additionally, a network and datastore may be provisionedfor use by the virtual machine. The virtual machine may then usecomputing resources of the provisioned computing devices. In oneembodiment, the provisioning of the computing devices is performed by aseparate application. Provisioning determination manager 106 queries theapplication that performs the provisioning on which computing deviceswere provisioned for the virtual machine. In another embodiment, theprovisioning may be performed by provisioning manager 106.

The costs that are assigned to the physical infrastructure are stored ina chargeback database 112. For example, costs may be assigned tocomputing resources of computing devices in the data center. These costsare then automatically assigned to a virtual machine when the virtualmachine is instantiated in a virtual infrastructure. For example, a costconfiguration manager 108 retrieves costs from chargeback database 112for computing resources of a computing device provisioned with thevirtual machine. The costs of the computing resources may then be usedto determine a charge for usage of the computing resources, which willbe described in more detail below.

Accordingly, the charge for usage of the virtual machine may bedetermined based on costs that were assigned to computing resources ofcomputing devices in the physical infrastructure. By assigning costs tocomputing resources of computing devices, a cost does not have to bemanually input for a virtual machine. Rather, cost configuration manager108 can automatically calculate costs for the virtual machine based onthe costs assigned to computing resources for the computing deviceprovisioned in the physical infrastructure. Because the physicalinfrastructure does not change as frequently as the virtualinfrastructure, the assignment of costs may be reduced. For example, itmay be more likely that virtual machines are added to the virtualinfrastructure than computing devices are added to the physicalinfrastructure. Thus, costs may only need to be assigned when physicalcomputing devices are added to the physical infrastructure.

The virtual infrastructure and physical infrastructure may be organizedinto hierarchies. A user may access the hierarchies and instantiatevirtual machines to the virtual infrastructure or add costs to computingdevices in the physical infrastructure. FIG. 2a depicts an example of ahierarchy for a physical infrastructure 202 and a virtual infrastructure204 according to one embodiment. Although this hierarchy is shown, otherways of organizing physical infrastructure 202 and virtualinfrastructure 204 may be used.

Virtual infrastructure 204 may be associated with an entity leasingaccess to computing resources of the data center. Virtual infrastructure204 may be organized in an organizational hierarchy based on the entity.For example, different departments shown as a first department Dept1 anda second department Dept2 may be included in the entity. Differentdepartments of the organization may be associated with different virtualmachines. For example, department Dept1 is associated with a firstvirtual machine VM1 and a second virtual machine VM2. Department Dept2is associated with a third virtual machine VM3 and a fourth virtualmachine VM4. Different virtual machines may be instantiated in theorganizational hierarchy. As different virtual machines areinstantiated, a cost for the VM is automatically calculated.

Physical infrastructure 202 may represent computing devices of the datacenter. FIG. 3 illustrates a simplified example of a physicalinfrastructure of data center 300 according to one embodiment. Datacenter 300 includes hosts 302, datastores 304, and networks 306.

Hosts 302 include basic system components such as a CPU, memory, a disk,and a network interface. Host 302 incorporates a hypervisor or virtualmachine monitor. One or more virtual machines execute on the hypervisor.Host 302, in one embodiment, is a basic building block of a data center.When hosts 302 are described, it will be understood that similar actionsmay be performed for clusters of hosts. For example, costs may beassigned to clusters of hosts.

Datastores 304 may be a virtual instantiation of databases that areconfigured to store data for the entity. A number of disks may be usedby a datastore 304 to store the data. Networks 306 are configured forthe entity to transfer data. For example, networks may include localarea networks (LANs) in the data center. Virtual machines may usedatastores 304 and networks 306.

Referring back to FIG. 2a , in physical infrastructure 202, categoriesof hosts 302, datastores 304, and networks 306 are listed in thehierarchy. Each category may identify various computing devices thatcorrespond to physical computing devices in the data center. Forexample, hosts 302 may include hosts H1 . . . Hn. Similarly, datastores304 include datastores DS1 . . . DSn and networks 306 include networksN1 . . . Nn. Costs may be assigned to computing devices and/or thecomputing resources of the computing devices. For example, a cost isshown as being associated with each host 302, datastore 304, and network306.

The costs for the computing device may be configured for general use ofthe computing device itself or may be further defined for computingresources of the computing device. Different costs may be assigned todifferent computing resources. For example, different factors may beused to determine the costs for each computing resource, such the speedof the computing resource, the size of the data storage, etc. For hosts302, costs may be configured for the computing resources for hosts 302for CPU, disk read and write, disk read, disk write, memory, networkreceived and transmitted, network received, network transmitted, andvCPU.

FIG. 2b shows an example of configured costs for computing resourcesaccording to one embodiment. A table 250 a shows costs configured forcomputing resources for a first host H1 and a table 250 b shows costsconfigured for computing resources for a second host H2. A column 252shows the computing resources available in each host. Also, a column 254includes the costs assigned to the computing resources. The costs may bebased on units, such as gigahertz (GHz) for speed and gigabytes (GB) forstorage.

Different costs may be assigned to computing resources for datastoresDS1 and DS2. Different factors may be taken into account. For example,datastore DS1 could be created on a slower and less expensive storage,while datastore DS2 could be created on a faster and mirrored storage.The faster storage with more robust features may be configured with ahigher cost. The cost for each computing resource may be configured. Forexample, a cost may be manually inputted for each computing resource ofdatastores DS1 and DS2. Also, a base cost may be configured forcomputing resources. Then, a rate factor may be applied to the base costfor each computing resource on different computing devices. For example,the base cost for storage may be $1/GB-hr. A rate factor of 2 may beapplied for datastore DS1 so that a cost of $1*2=$2/GB-hr is configuredfor datastore DS1. A rate factor of 3 may be applied for datastore DS2so that a cost of $1*3=$3/GB-hr is configured for datastore DS2.

Storage for the virtual machine is provisioned from the datastore. Thestorage for the virtual machine may be a virtual machine disk. So, if avirtual machine disk resides on a datastore, the rate factor of thatdatastore is applied for charging.

Referring back to FIG. 2a , computing resources, such as CPU, memory,and/or datastores of physical infrastructure 202 may also be defined inmultiple tiers. For example, tiers for datastores are shown in FIG. 2a ,but tiers may be used in other computing resources. A cost may bedefined for a tier that may include multiple datastores 304. In oneexample, a tier 1 for data storage may include datastore DS1 anddatastore DS2. A tier 2 may include datastore DS3 and datastore DS4. Acost for tier 1 may be defined as a first cost (e.g., $1/GB-hr) and acost for tier 2 may be defined as second cost (e.g., $2/GB-hr). Whenstorage for a virtual machine is provisioned from a datastore 304 in oneof the tiers, the cost for the tier is determined as the cost. Forexample, if the virtual machine is provisioned storage from datastoreDS2, a first cost of $1/GB is assigned because datastore DS2 is part oftier 1.

The tiers may be used because multiple datastores 304 may be createdfrom a physical storage device. As multiple datastores 304 are createdfrom the same physical storage device, these datastores 304 may begrouped together in a tier and a cost is assigned to the tier. Thetiering simplifies costs in that datastores 304 created from the sameunderlying physical storage device may be assigned the same cost.

Other methods may also be used to group datastores 304. For example,service levels for datastores 304 may be used to group datastores 304into tiers. In one example, if a physical storage is mirrored or backedup, a datastore 304 in this group may be assigned a higher cost.

The hierarchies for physical infrastructure 202 and virtualinfrastructure 204 may be stored in chargeback database 112. The costsassociated with computing devices are then used to determine a cost fora virtual machine.

In some embodiments, a fixed cost may be assigned to a virtual machinefor using certain features. For example, if the virtual machine uses apolicy, such as high availability (HA), fault tolerance (FT), a fixedcost may be assigned for the use of those policies. Further, a fixedcost may be used for an operating system used by host 302. The fixedcost may override the automated cost that could be calculated for thevirtual machine based on the provisioning, or may be used in conjunctionwith the automated cost.

FIG. 4 depicts a simplified flowchart 400 of a method for calculating acost for a virtual machine according to one embodiment. At 402, avirtual machine is instantiated in virtual infrastructure 204. Thevirtual machine may specify computing device/computing resourcerequirements for the virtual machine. For example, a specific host or alevel of service may be specified.

At 404, provisioned computing devices are determined for the virtualmachine. For example, an application may provision a computing devicefrom physical infrastructure 202 for the virtual machine. The virtualmachine may use computing resources from the computing device. Thecomputing devices that are being used by the virtual machine are thendetermined based on the provisioning.

At 406, the costs that are assigned to the provisioned computing devicesare determined. For example, database 112 is accessed and the costs forvarious computing resources of the computing devices are retrieved. Thecomputing resources that are used to charge an entity may vary. Forexample, the data center may decide to charge based on CPU and memoryuse for a host. This is configurable by the data center and is describedin more detail below with respect to billing policies.

At 408, a charge for the virtual machine is calculated. For example, thecharge may be a summary of charges associated with the usage of thecomputing resources for the computing device.

In one embodiment, the charge is calculated using a billing policy. Abilling policy is a method of how to calculate usage of computingresources. The usage is defined by attributes, which define what type ofuse to measure for the computing resource. A resource billing policy maybe selected for a computing resource. The resource billing policy isdefined with attributes associated with the computing resource. Ifmultiple computing resources are being charged to a virtual machine,then a VM billing policy may be formed, which includes resource billingpolicies for the multiple computing resources.

Attributes and units are assigned to computing resources. For example,different computing resources may be associated with attributes. In oneexample, CPUs may have the following attributes and units shown in Table1.

TABLE I CPU Attribute Unit Reservation GHz Usage GHz Allocation GHz

Each CPU may have the same attributes and units. The attribute is thetype of use and the unit is the measurement of the use. The attributereservation may be the amount of CPU time that is reserved. The usageattribute may be the amount of time the CPU is used. The allocationattribute may be the number of the CPUs allocated. The unit is GHz,which may be the speed of a CPU.

Different computing resources may have different attributes with thesame or different units. For example, Table 2 shows a table summarizingthe attributes and units for a memory computing resource.

TABLE II memory Attribute Unit Reservation GB Usage GB Allocation GBSize GB

The reservation, usage, allocation, and size are shown in a unit ofsize, such as GB. The reservation attribute may be the amount of memorythat is reserved; the usage attribute may be the amount of memory thatis used; the allocation attribute may be the amount of memory that isallocated; and the size attribute may be the size of the memoryprovisioned. The attributes of memory are measured in GB units. Othercomputing resources may include associated attributes and units that areassigned to them.

FIG. 5 depicts a simplified flowchart 500 of a method for determining aVM billing policy according to one embodiment. At 502, a resourcebilling policy and attributes for a computing resource are determined.The resource billing policy is a method used to determine usage for anattribute of a computing resource. For example, an attribute defineswhat is measured for the computing resource, such as the number of CPUsallocated may be measured. The use of the CPU by a virtual machine maybe sampled multiple times during a period, such as the number of CPUsthat are allocated is measured multiple times. Different ways ofdetermining the usage over that period may then be used. For example,the resource billing policy may take the average of the CPUs allocatedover the period, take the maximum CPUs allocated in a sample in theperiod, or a percentage of the maximum CPUs allocated over the period.

For a single billing policy, any number of attributes may be defined.For example, the attributes “allocation” and “reservation” may bedefined. In this case both attributes are used by the resource billingpolicy. Also, although a single billing policy for a computing resourceis discussed, multiple billing policies for a computing resource may beused.

At 504, an expression for the resource billing policy and attributes isgenerated. The expression includes an operation and attributes. Theoperation may be a way to measure the usage of the attributes together,such as maximum, addition, minimum, and other operators. For example, anexpression of “Max(CPU usage, CPU reservation)” may indicate that themaximum of used and reserved units of CPU is considered for the costcalculation during the time period.

At 506, the expression is added to a VM billing policy for the virtualmachine. For example, multiple resource billing policies for computingresources may be generated using the process above and form a VM billingpolicy for the virtual machine.

A flexible billing structure is provided using the billing policies. Forexample, a data center can choose how to bill computing resources for acomputing device. The billing policies may be defined per a computingdevice, a computing resource, or per customer. For example, a billingpolicy may define an average CPU usage as a billing policy. This billingpolicy may be applicable to all customers that use host H1. Thus, when avirtual machine is provisioned with host H1, this billing policy isused. Also, the billing policy may be adjusted for different customers.For example, the billing policy may be specified for one customer to bemaximum CPU reservation for host H1. This gives the data centerflexibility in billing for use of computing resources.

Once the VM billing policy is generated, usage of computing resourcesmay be monitored and applied to the VM billing policy. FIG. 6 depicts amore detailed example of chargeback manager 104 according to oneembodiment. Chargeback manager 104 may include a billing policy manager602, a usage monitor 604, provisioning determination manager 106, costconfiguration manager 108, a cost calculator 606, and a report generator608.

Billing policy manager 602 generates a VM billing policy. For example,resource billing policies for computing devices provisioned to thevirtual machine are determined and added to the VM billing policy asdescribed above.

Usage monitor 604 receives usage data for computing devices for thevirtual machine. For example, computing resources used by the virtualmachine are monitored. The monitoring includes collecting data for CPUuse, memory use, disk use, network use, etc.

Provisioning determination manager 106 determines the computing devicesthat are provisioned with the virtual machine. For example, provisioningdetermination manager 106 queries a provisioning application todetermine which computing devices were provisioned with the virtualmachine. The computing resources being used by the virtual machine areassociated with the computing devices. Cost configuration manager 108then determines the costs associated with computing resources of thecomputing devices. In one example, costs for the computing resourcesbeing billed for are determined. For example, if a data center is onlycharging for CPU use of a host 302 being used by a virtual machine, thecost for CPU use is determined.

Cost calculator 606 receives the cost for the computing resources of thecomputing devices provisioned to the virtual machine and the VM billingpolicy for the computing resources. Cost calculator 606 determines theusage of the computing resources based on the billing policy. Forexample, the billing policy is applied to the usage data to determinethe use during a period, such as an average CPU use is determined. Then,the charge for a computing resource is determined. For example, costcalculator 606 determines the charge based on the usage and the cost fora computing resource. In one example, if the average usage of a CPU is 1GHz for an hour, and the cost for that CPU is $2/GHz-hr, then the chargeis $2.00. The above calculation may be performed for all the computingresources being billed to the virtual machine.

Report manager 608 may then generate a report with the charge for the VMand send it to the entity. For example, the charges for each of thecomputing resources used and charged to the VM may be included in thereport.

An example will be described referring to FIG. 2b . A first virtualmachine VM1 and a second virtual machine VM2 may be instantiated in avirtual infrastructure for an entity. The first virtual machine VM1 isprovisioned to a computing device of host H1 and the second virtualmachine is provisioned to a computing device of host H2 in physicalinfrastructure 202. The billing policy defines the computing resourcesas CPU usage and memory usage for host H1 and CPU reservation and memoryusage for host H2. A billing policy for virtual machine VM1 is thus CPUusage and memory usage for host H1 and a billing policy for virtualmachine VM2 is CPU reservation and memory usage for host H1. Bothbilling policies use the average of the usage data received.

The costs for host H1 are $2/hr for CPU usage and $1/hr for memoryusage. The costs for Host H2 are $3/her for CPU reservation and $1.5/hrfor memory usage. The average of the usage of the computing resources isthen determined. For example, an average CPU use and memory use aredetermined for virtual machine VM1 on host H1. Also, an average CPUreservation and memory usage are determined for virtual machine VM2 onhost H2. The respective costs are applied to the usage to determine acharge for virtual machine VM1 and virtual machine VM2.

Accordingly, particular embodiments assign costs to computing resourcesin physical infrastructure 202. These costs are used to determine acharge for a virtual machine. Thus, costs do not need to be assigned tovirtual machines when a virtual machine is instantiated. Rather, coststhat are assigned to computing resources of computing devices are usedto determine a charge for usage of the virtual machine.

Billing policies may also be defined to provide finer granularity forcharging for the usage of the virtual machine. For example, the billingpolicy defines attributes of the usage of computing resources that canbe applied to different billing policies. The usage and cost forcomputing resources may then be applied to the billing policy todetermine the charge for the usage of the virtual machine.

The various embodiments described herein may employ variouscomputer-implemented operations involving data stored in computersystems. For example, these operations may require physical manipulationof physical quantities—usually, though not necessarily, these quantitiesmay take the form of electrical or magnetic signals, where they orrepresentations of them are capable of being stored, transferred,combined, compared, or otherwise manipulated. Further, suchmanipulations are often referred to in terms, such as producing,identifying, determining, or comparing. Any operations described hereinthat form part of one or more embodiments may be useful machineoperations. In addition, one or more embodiments also relate to a deviceor an apparatus for performing these operations. The apparatus may bespecially constructed for specific required purposes, or it may be ageneral purpose computer selectively activated or configured by acomputer program stored in the computer. In particular, various generalpurpose machines may be used with computer programs written inaccordance with the teachings herein, or it may be more convenient toconstruct a more specialized apparatus to perform the requiredoperations.

The various embodiments described herein may be practiced with othercomputer system configurations including hand-held devices,microprocessor systems, microprocessor-based or programmable consumerelectronics, minicomputers, mainframe computers, and the like.

One or more embodiments may be implemented as one or more computerprograms or as one or more computer program modules embodied in one ormore non-transitory computer readable storage media. The term computerreadable storage medium refers to any data storage device that can storedata which can thereafter be input to a computer system—computerreadable media may be based on any existing or subsequently developedtechnology for embodying computer programs in a manner that enables themto be read by a computer. Examples of a computer readable medium includea hard drive, network attached storage (NAS), read-only memory,random-access memory (e.g., a flash memory device), a CD (CompactDiscs)—CD-ROM, a CD-R, or a CD-RW, a DVD (Digital Versatile Disc), amagnetic tape, and other optical and non-optical data storage devices.The computer readable medium can also be distributed over a networkcoupled computer system so that the computer readable code is stored andexecuted in a distributed fashion.

In addition, while described virtualization methods have generallyassumed that virtual machines present interfaces consistent with aparticular hardware system, persons of ordinary skill in the art willrecognize that the methods described may be used in conjunction withvirtualizations that do not correspond directly to any particularhardware system. Virtualization systems in accordance with the variousembodiments, implemented as hosted embodiments, non-hosted embodimentsor as embodiments that tend to blur distinctions between the two, areall envisioned. Furthermore, various virtualization operations may bewholly or partially implemented in hardware.

Many variations, modifications, additions, and improvements arepossible, regardless the degree of virtualization. The virtualizationsoftware can therefore include components of a host, console, or guestoperating system that performs virtualization functions. Pluralinstances may be provided for components, operations or structuresdescribed herein as a single instance. Finally, boundaries betweenvarious components, operations and datastores are somewhat arbitrary,and particular operations are illustrated in the context of specificillustrative configurations. Other allocations of functionality areenvisioned and may fall within the scope of the invention(s). Ingeneral, structures and functionality presented as separate componentsin exemplary configurations may be implemented as a combined structureor component. Similarly, structures and functionality presented as asingle component may be implemented as separate components.

These and other variations, modifications, additions, and improvementsmay fall within the scope of the appended claims(s). As used in thedescription herein and throughout the claims that follow, “a”, “an”, and“the” includes plural references unless the context clearly dictatesotherwise. Also, as used in the description herein and throughout theclaims that follow, the meaning of “in” includes “in” and “on” unlessthe context clearly dictates otherwise.

The above description illustrates various embodiments of the presentinvention along with examples of how aspects of the present inventionmay be implemented. The above examples and embodiments should not bedeemed to be the only embodiments, and are presented to illustrate theflexibility and advantages of the present invention as defined by thefollowing claims. Based on the above disclosure and the followingclaims, other arrangements, embodiments, implementations and equivalentsmay be employed without departing from the scope of the invention asdefined by the claims.

What is claimed is:
 1. A method comprising: storing a cost assigned to a physical computing device in a storage device, the physical computing device being found in a physical infrastructure of a data center; determining an instantiation of a virtual machine in a virtual infrastructure; receiving information for a provisioning of the virtual machine with the physical computing device in the physical infrastructure of the data center; and retrieving, by a computer system, the cost assigned to the physical computing device from the storage device, wherein the cost is used to determine a charge for the virtual machine based on usage of the physical computing device.
 2. The method of claim 1, wherein: the cost is assigned to a computing resource of the physical computing device, and the usage of the computing resource is used to determine the charge.
 3. The method of claim 1, further comprising: storing a plurality of costs assigned to a plurality of physical computing devices in the physical infrastructure in the data storage; and retrieving one or more of the costs assigned to one or more physical computing devices from the data storage automatically upon instantiation of the virtual machine.
 4. The method of claim 1, wherein the physical infrastructure comprises a plurality of physical computing devices, wherein one or more costs are assigned to one or more computing resources associated with each physical computing device.
 5. The method of claim 1, further comprising: monitoring usage of a computing resource for the virtual machine; and applying the cost for the computing resource to the monitored usage to determine the charge for the virtual machine.
 6. The method of claim 1, further comprising: defining a set of attributes for a computing resource of the physical computing device, wherein an attribute defines a way to measure usage of the computing resource; and defining a set of billing policies for the physical computing device, wherein a billing policy defines a method to calculate usage of an attribute of the computing resource.
 7. The method of claim 6, further comprising: receiving a selection of one or more attributes for a computing resource of the physical computing device; receiving a selection of an operation; and generating an expression from the selection of the one or more attributes and the operation, the expression used to determine the charge when the computing resource is used by the virtual machine.
 8. The method of claim 1, wherein: a billing policy is generated that specifies one or more computing resources that are to be billed for the physical computing device, one or more costs for the one or more computing resources are determined, and the charge is determined based on the one or more costs for the specified one or more computing resources and the usage of the specified one or more computing resources.
 9. The method of claim 1, further comprising: determining a plurality of tiers for a computing resource of the physical computing device; assigning a cost to each tier; determining the virtual machine is associated with the computing resource included in a tier in the plurality of tiers; and using the cost of the tier to determine the charge for the virtual machine.
 10. The method of claim 1, wherein the cost assigned to the physical computing device is determined automatically upon instantiation of the virtual machine in the virtual infrastructure.
 11. A non-transitory computer-readable storage medium containing instructions for controlling a computer system to be operable to: store a cost assigned to a physical computing device in a storage device, the physical computing device being found in a physical infrastructure of a data center; determine an instantiation of a virtual machine in a virtual infrastructure; receive information for a provisioning of the virtual machine with the physical computing device in the physical infrastructure of the data center; and retrieve the cost assigned to the physical computing device from the storage device, wherein the cost is used to determine a charge for the virtual machine based on usage of the physical computing device.
 12. The computer-readable storage medium of claim 11, wherein: the cost is assigned to a computing resource of the physical computing device, and the usage of the computing resource is used to determine the charge.
 13. The computer-readable storage medium of claim 11, further operable to: store a plurality of costs assigned to a plurality of physical computing devices in the physical infrastructure in the data storage; and retrieve one or more of the costs assigned to one or more physical computing devices from the data storage automatically upon instantiation of the virtual machine.
 14. The computer-readable storage medium of claim 11, further operable to: receive a selection of one or more attributes for a computing resource of the physical computing device; receive a selection of an operation; and generate an expression from the selection of the one or more attributes and the operation, the expression used to determine the charge when the computing resource is used by the virtual machine.
 15. The computer-readable storage medium of claim 11, further operable to: determine a plurality of tiers for a computing resource for the physical computing device; assign a cost to each tier; determine the virtual machine is associated with the computing resource included in a tier in the plurality of tiers; and use the cost of the tier to determine the charge for the virtual machine.
 16. A method comprising: storing a plurality of costs to a plurality of computing resources in a data storage device, the plurality of computing resources being found in a physical infrastructure; measuring usage of a computing resource by a virtual machine in a virtual infrastructure; determining a physical computing device in the physical infrastructure associated with the computing resource; retrieving a cost assigned to the computing resource from the data storage device based on the determined physical computing device; and determining, by a computer system, a charge for the virtual machine based on the measured usage of the computing resource and the determined cost assigned the computing resource.
 17. The method of claim 16, further comprising receiving information for a provisioning of the virtual machine with the physical computing device, wherein the information is used to determine that the computing resource is associated with the physical computing device.
 18. The method of claim 16, further comprising defining a billing policy for the computing resource, wherein the billing policy is used to determine the charge for the virtual machine.
 19. The method of claim 16, further comprising associating the determined cost assigned to the computing resource with the virtual machine.
 20. The method of claim 16, wherein the cost assigned to the computing resource is determined automatically upon an instantiation of the virtual machine in the virtual infrastructure. 